package com.back_end.Array.Reverse;

public class ReverseArray {
    //逆序输出
    public static void main(String[] args) {
        int[]   arr = new int[]{1,2,3,4,5,6,7,8};
        System.out.println(arr.length);
        for(int i = 0;i<arr.length/2;i++){
            int t = arr[arr.length-i-1];
            arr[arr.length-i-1] = arr[i];
            arr[i] = t;
        }
        for(Object o:arr){
            System.out.print(o+" ");
        }
    }

}
